#!/bin/bash

# Navigate to the project's source directory
cd ./app/

# Reset CSS and JS
rm -f ./client/assets/css/tmp.css
rm -f ./client/assets/css/style.css
mv ./client/assets/js/isaiah.backup.js ./client/assets/js/isaiah.js

# Remove the version parameter from the main JS & CSS linked files
sed -i.bak -E 's/\?v=[0-9.]+//' ./client/index.html
rm -f ./client/index.html.bak
rm -f ./client/assets/js/isaiah.js.bak

# Remove the version parameter from the main Go file
sed -i.bak -E 's/Version\: [0-9.]+/Version\: -VERSION-/' ./main.go
rm -f ./main.go.bak

# Remove dist folder generated by goreleaser
rm -rf ./dist/
